package han.chensing.latos.maker.util;

import com.badlogic.gdx.scenes.scene2d.InputEvent;
import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;

public interface CClickListener {
    void onClick(InputEvent event, float x, float y);
    class CClickListenerAdapter extends ClickListener {
        CClickListener listener;
        public CClickListenerAdapter(CClickListener listener){
            this.listener=listener;
        }
        public ClickListener get(){
            return new ClickListener(){
                @Override
                public void clicked(InputEvent event, float x, float y) {
                    super.clicked(event, x, y);
                    listener.onClick(event, x, y);
                }
            };
        }
    }
}